<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>译林高中词汇Book1 Unit2</title>
    <style>
        body {
            font-family: '微软雅黑', sans-serif;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
        }
        th, td {
            border: 1px solid #000;
            padding: 10px;
            vertical-align: middle;
        }
        th {
            background-color: #f2f2f2;
            font-size: 32px;
            text-align: center;
        }
        .word {
            color: black;
            cursor: pointer;
            font-size: 32px;
            font-weight: bold;
            text-align: center;
        }
        .phonetic {
            color: darkgreen;
            font-size: 20px;
            text-align: center;
        }
        .image {
            text-align: center;
            vertical-align: middle;
        }
        .image img {
            display: block;
            margin-left: auto;
            margin-right: auto;
            max-width: 100%;
            height: auto;
        }
        .center {
            text-align: center;
            vertical-align: middle;
            font-size: 20px;
        }
        .left {
            text-align: left;
            vertical-align: middle;
            font-size: 20px;
        }
        .sentence {
            cursor: pointer;
        }
    </style>
    <script>
        function playSound(text) {
            var audio = new Audio('https://dict.youdao.com/dictvoice?type=0&audio=' + text);
            audio.play();
        }

        function createTable(data) {
            var table = document.getElementById("wordsTable");
            data.forEach(item => {
                // Title row
                var titleRow = document.createElement("tr");
                var titleCell = document.createElement("th");
                titleCell.colSpan = 3;
                titleCell.textContent = "Book1 Unit2";
                titleRow.appendChild(titleCell);
                table.appendChild(titleRow);

                // Word row
                var wordRow = document.createElement("tr");
                var wordCell = document.createElement("td");
                wordCell.className = "word";
                wordCell.onclick = function() { playSound(item.word); };
                wordCell.textContent = item.word;
                wordRow.appendChild(wordCell);

                var meaningCell = document.createElement("td");
                meaningCell.rowSpan = 2;
                meaningCell.className = "center";
                meaningCell.textContent = item.meaning;
                wordRow.appendChild(meaningCell);

                var imageCell = document.createElement("td");
                imageCell.rowSpan = 4;
                imageCell.className = "image";
                var img = document.createElement("img");
                img.src = `${item.word}.jpg`;
                img.alt = `${item.word}的图片`;
                imageCell.appendChild(img);
                wordRow.appendChild(imageCell);
                table.appendChild(wordRow);

                // Phonetic row
                var phoneticRow = document.createElement("tr");
                var phoneticCell = document.createElement("td");
                phoneticCell.className = "phonetic";
                phoneticCell.textContent = item.phonetic;
                phoneticRow.appendChild(phoneticCell);
                table.appendChild(phoneticRow);

                // Example sentence row
                var exampleRow = document.createElement("tr");
                var exampleCell = document.createElement("td");
                exampleCell.colSpan = 2;
                exampleCell.className = "left sentence";
                exampleCell.onclick = function() { playSound(item.example_sentence); };
                exampleCell.textContent = item.example_sentence;
                exampleRow.appendChild(exampleCell);
                table.appendChild(exampleRow);

                // Translation row
                var translationRow = document.createElement("tr");
                var translationCell = document.createElement("td");
                translationCell.colSpan = 2;
                translationCell.className = "left";
                translationCell.textContent = item.translation;
                translationRow.appendChild(translationCell);
                table.appendChild(translationRow);
            });
        }

        document.addEventListener("DOMContentLoaded", function() {
            var data = [
{
        "word": "nest",
        "phonetic": "/nɛst/",
        "meaning": "n. 巢；窝；舒适的安乐窝",
        "example_sentence": "The bird built its nest high up in the tree, safe from predators.",
        "translation": "那只鸟在树上高高地筑起了巢，避免了天敌的威胁。"
    },
    {
        "word": "roof",
        "phonetic": "/ruːf/",
        "meaning": "n. 屋顶；顶部",
        "example_sentence": "The roof of the house was damaged in the storm, and it needed immediate repair.",
        "translation": "那场暴风雨损坏了房子的屋顶，需要立即修理。"
    },
    {
        "word": "battle",
        "phonetic": "/ˈbætl/",
        "meaning": "n. 战斗；斗争",
        "example_sentence": "The battle between the two armies lasted for hours, with heavy losses on both sides.",
        "translation": "两军的战斗持续了数小时，双方都损失惨重。"
    },
    {
        "word": "see eye to eye with sb (on sth)",
        "phonetic": "/siː aɪ tə aɪ wɪð/",
        "meaning": "phr. 与某人在某事上意见一致",
        "example_sentence": "They don’t always see eye to eye with each other on business strategies, but they respect one another’s perspective.",
        "translation": "他们在商业战略上并不总是意见一致，但彼此尊重对方的观点。"
    },
    {
        "word": "argument",
        "phonetic": "/ˈɑːɡjʊmənt/",
        "meaning": "n. 争论；论据",
        "example_sentence": "The heated argument between the two friends over politics lasted late into the night.",
        "translation": "这两个朋友之间关于政治的激烈争论持续到深夜。"
    },
    {
        "word": "teenager",
        "phonetic": "/ˈtiːnˌeɪdʒə/",
        "meaning": "n. 青少年",
        "example_sentence": "As a teenager, she loved going to concerts and spending time with her friends.",
        "translation": "作为一名青少年，她喜欢去听音乐会并与朋友们一起度过时光。"
    },
    {
        "word": "tension",
        "phonetic": "/ˈtɛnʃən/",
        "meaning": "n. 紧张；压力",
        "example_sentence": "The tension in the room was palpable as the two negotiators exchanged harsh words.",
        "translation": "当两位谈判者交换严厉言辞时，房间里的紧张气氛变得一触即发。"
    },
    {
        "word": "anxious",
        "phonetic": "/ˈæŋkʃəs/",
        "meaning": "adj. 焦虑的；担心的",
        "example_sentence": "She was anxious about the upcoming exam, fearing she hadn’t studied enough.",
        "translation": "她对即将到来的考试感到焦虑，担心自己没有复习好。"
    },
    {
        "word": "rate",
        "phonetic": "/reɪt/",
        "meaning": "n. 速度；比率；价格",
        "example_sentence": "The unemployment rate has been steadily decreasing over the past year.",
        "translation": "过去一年，失业率稳步下降。"
    },
    {
        "word": "shoot",
        "phonetic": "/ʃuːt/",
        "meaning": "v. 射击；拍摄",
        "example_sentence": "The photographer was ready to shoot the sunset, capturing the perfect moment.",
        "translation": "摄影师准备拍摄日落，捕捉完美的瞬间。"
    },
    {
        "word": "shoot up",
        "phonetic": "/ʃuːt ʌp/",
        "meaning": "phr. 急剧上升；猛增",
        "example_sentence": "Gas prices shot up overnight, causing concern among consumers.",
        "translation": "汽油价格一夜之间猛增，引发了消费者的担忧。"
    },
    {
        "word": "spot",
        "phonetic": "/spɒt/",
        "meaning": "n. 地点；斑点 v. 发现；认出",
        "example_sentence": "We found a beautiful spot by the river to have our picnic.",
        "translation": "我们在河边找到了一个美丽的地方野餐。"
    },
    {
        "word": "target",
        "phonetic": "/ˈtɑːɡɪt/",
        "meaning": "n. 目标 v. 瞄准",
        "example_sentence": "The company set ambitious sales targets for the upcoming quarter.",
        "translation": "公司为下一季度设定了雄心勃勃的销售目标。"
    },
    {
        "word": "anger",
        "phonetic": "/ˈæŋɡə/",
        "meaning": "n. 愤怒；怒火",
        "example_sentence": "His sudden outburst of anger surprised everyone in the room.",
        "translation": "他突然的愤怒爆发让房间里的每个人都感到惊讶。"
    },
    {
        "word": "mental",
        "phonetic": "/ˈmɛntəl/",
        "meaning": "adj. 精神的；心理的",
        "example_sentence": "Mental health is just as important as physical health in maintaining overall well-being.",
        "translation": "保持整体健康时，心理健康和身体健康同样重要。"
    },
    {
        "word": "adult",
        "phonetic": "/ˈædʌlt/",
        "meaning": "n. 成人 adj. 成熟的",
        "example_sentence": "She has grown into a responsible adult who takes care of her family.",
        "translation": "她已经成长为一名负责任的成年人，照顾她的家庭。"
    },
    {
        "word": "desire",
        "phonetic": "/dɪˈzaɪə/",
        "meaning": "n. 欲望；渴望 v. 渴望；要求",
        "example_sentence": "He expressed a strong desire to travel the world and experience different cultures.",
        "translation": "他表达了强烈的愿望，想环游世界并体验不同的文化。"
    },
    {
        "word": "struggle",
        "phonetic": "/ˈstrʌɡl/",
        "meaning": "v. 努力；奋斗 n. 斗争；挣扎",
        "example_sentence": "The athlete struggled to finish the race, but her perseverance paid off.",
        "translation": "这位运动员奋力完成比赛，最终她的坚持得到了回报。"
    },
    {
        "word": "rough",
        "phonetic": "/rʌf/",
        "meaning": "adj. 粗糙的；艰难的",
        "example_sentence": "It was a rough day at work, with unexpected problems and tight deadlines.",
        "translation": "这是工作中艰难的一天，充满了意想不到的问题和紧迫的截止日期。"
    },
{
        "word": "breakdown",
        "phonetic": "/ˈbreɪkdaʊn/",
        "meaning": "n. 故障；崩溃；分解",
        "example_sentence": "The car had a breakdown in the middle of the road, causing a traffic jam.",
        "translation": "汽车在路中间抛锚了，导致了交通堵塞。"
    },
    {
        "word": "regular",
        "phonetic": "/ˈrɛɡjʊlə/",
        "meaning": "adj. 定期的；常规的；规则的",
        "example_sentence": "He visits the gym on a regular basis to stay in shape.",
        "translation": "他定期去健身房保持体形。"
    },
    {
        "word": "calm",
        "phonetic": "/kɑːm/",
        "meaning": "adj. 平静的；冷静的 v. 使平静",
        "example_sentence": "She took a deep breath to calm herself before giving the speech.",
        "translation": "她深吸了一口气让自己平静下来，然后开始演讲。"
    },
    {
        "word": "calm down",
        "phonetic": "/kɑːm daʊn/",
        "meaning": "phr. 冷静下来；平息",
        "example_sentence": "After the argument, they needed some time to calm down and think clearly.",
        "translation": "争吵之后，他们需要一些时间冷静下来并清晰地思考。"
    },
    {
        "word": "view",
        "phonetic": "/vjuː/",
        "meaning": "n. 观点；视野；景色",
        "example_sentence": "From the hill, the view of the sunset was breathtaking.",
        "translation": "从山上看，日落的景色美得令人窒息。"
    },
    {
        "word": "from one’s point of view",
        "phonetic": "/frɒm wʌnz pɔɪnt ɒv vjuː/",
        "meaning": "phr. 从某人的观点来看",
        "example_sentence": "From her point of view, the project needs more time for completion.",
        "translation": "从她的观点来看，这个项目需要更多的时间来完成。"
    },
    {
        "word": "think sth through",
        "phonetic": "/θɪŋk θruː/",
        "meaning": "phr. 彻底考虑某事",
        "example_sentence": "Before making a final decision, it's important to think the options through.",
        "translation": "在做最终决定之前，彻底考虑选项是很重要的。"
    },
    {
        "word": "concern",
        "phonetic": "/kənˈsɜːn/",
        "meaning": "n. 担忧；关心 v. 使担心",
        "example_sentence": "Her main concern is whether the new job will allow her enough time with her family.",
        "translation": "她主要的担忧是新工作是否能让她有足够的时间陪伴家人。"
    },
    {
        "word": "back down",
        "phonetic": "/bæk daʊn/",
        "meaning": "phr. 让步；认输",
        "example_sentence": "After a long debate, he refused to back down and held his ground.",
        "translation": "经过长时间的辩论，他拒绝让步，坚持自己的立场。"
    },
    {
        "word": "normal",
        "phonetic": "/ˈnɔːməl/",
        "meaning": "adj. 正常的；常规的",
        "example_sentence": "It's normal to feel nervous before a big event.",
        "translation": "在大事件之前感到紧张是正常的。"
    },
    {
        "word": "stress",
        "phonetic": "/strɛs/",
        "meaning": "n. 压力；紧张 v. 强调；施加压力",
        "example_sentence": "He was under a lot of stress at work, trying to meet tight deadlines.",
        "translation": "他在工作中压力很大，努力赶紧迫的截止日期。"
    },
    {
        "word": "editor",
        "phonetic": "/ˈɛdɪtə/",
        "meaning": "n. 编辑；主编",
        "example_sentence": "The editor revised the article to ensure it was free of errors before publishing.",
        "translation": "编辑在发布前对文章进行了修订，以确保没有错误。"
    },
    {
        "word": "argue",
        "phonetic": "/ˈɑːɡjuː/",
        "meaning": "v. 争论；争辩",
        "example_sentence": "They argued about the best approach to solve the problem for hours.",
        "translation": "他们争论了好几个小时，讨论解决问题的最佳方法。"
    },
    {
        "word": "skin",
        "phonetic": "/skɪn/",
        "meaning": "n. 皮肤；表皮",
        "example_sentence": "She has sensitive skin and needs to be careful with the products she uses.",
        "translation": "她的皮肤很敏感，需要小心使用产品。"
    },
    {
        "word": "design",
        "phonetic": "/dɪˈzaɪn/",
        "meaning": "n. 设计；图案 v. 设计；构思",
        "example_sentence": "The architect presented a modern design for the new building.",
        "translation": "建筑师展示了一种现代的建筑设计。"
    },
    {
        "word": "forum",
        "phonetic": "/ˈfɔːrəm/",
        "meaning": "n. 论坛；讨论会",
        "example_sentence": "They attended an international forum on climate change last month.",
        "translation": "他们上个月参加了一个关于气候变化的国际论坛。"
    },
    {
        "word": "expert",
        "phonetic": "/ˈɛkspɜːt/",
        "meaning": "n. 专家；行家",
        "example_sentence": "She is considered an expert in artificial intelligence and robotics.",
        "translation": "她被认为是人工智能和机器人领域的专家。"
    },
    {
        "word": "likely",
        "phonetic": "/ˈlaɪkli/",
        "meaning": "adj. 可能的；有希望的",
        "example_sentence": "It's likely that they will win the contract based on their competitive bid.",
        "translation": "根据他们的竞争性投标，他们很有可能赢得这份合同。"
    },
    {
        "word": "unique",
        "phonetic": "/juːˈniːk/",
        "meaning": "adj. 独特的；唯一的",
        "example_sentence": "Her unique style made her stand out from the crowd.",
        "translation": "她独特的风格让她在人群中脱颖而出。"
    },
    {
        "word": "passive",
        "phonetic": "/ˈpæsɪv/",
        "meaning": "adj. 被动的；消极的",
        "example_sentence": "Instead of being passive, it's important to take control of the situation.",
        "translation": "与其被动接受，不如掌控局面。"
    },
    {
        "word": "performance",
        "phonetic": "/pəˈfɔːməns/",
        "meaning": "n. 表演；表现；性能",
        "example_sentence": "Her performance in the play received rave reviews from critics.",
        "translation": "她在剧中的表演得到了评论家的高度赞扬。"
    },
    {
        "word": "cheer up",
        "phonetic": "/ʧɪə ʌp/",
        "meaning": "phr. 振作起来；使高兴",
        "example_sentence": "I tried to cheer him up after he received some disappointing news.",
        "translation": "在他收到令人失望的消息后，我试图让他振作起来。"
    },
    {
        "word": "press",
        "phonetic": "/prɛs/",
        "meaning": "n. 新闻；媒体 v. 按；压；施压",
        "example_sentence": "The press quickly covered the breaking news with live reports.",
        "translation": "媒体迅速报道了这则突发新闻，并进行了现场报道。"
    },
    {
        "word": "eager",
        "phonetic": "/ˈiːɡə/",
        "meaning": "adj. 渴望的；热切的",
        "example_sentence": "She was eager to start her new job and meet her colleagues.",
        "translation": "她急切地想开始新工作并认识同事。"
    },
    {
        "word": "youth",
        "phonetic": "/juːθ/",
        "meaning": "n. 青年；青春",
        "example_sentence": "The youth of today are more tech-savvy than previous generations.",
        "translation": "今天的年轻人比以前的几代人更擅长使用科技。"
    },
    {
        "word": "adventure",
        "phonetic": "/ədˈvɛntʃə/",
        "meaning": "n. 冒险；奇遇",
        "example_sentence": "They embarked on an exciting adventure through the Amazon rainforest.",
        "translation": "他们展开了一场穿越亚马逊雨林的激动人心的冒险。"
    },
    {
        "word": "be on sb’s back about sth",
        "phonetic": "/bi ɒn sbz bæk əˈbaʊt/",
        "meaning": "phr. 对某人唠叨某事；一直催促",
        "example_sentence": "My boss has been on my back about the report all week, so I need to finish it soon.",
        "translation": "我的老板整周都在催我交报告，所以我得尽快完成。"
    },
    {
        "word": "kangaroo",
        "phonetic": "/ˌkæŋɡəˈruː/",
        "meaning": "n. 袋鼠",
        "example_sentence": "We saw a kangaroo hopping across the road during our trip to Australia.",
        "translation": "我们在澳大利亚旅行时看到了一只袋鼠跳过了马路。"
    },
    {
        "word": "flexible",
        "phonetic": "/ˈflɛksɪbəl/",
        "meaning": "adj. 灵活的；柔韧的",
        "example_sentence": "Her schedule is very flexible, allowing her to balance work and family.",
        "translation": "她的日程安排非常灵活，能够平衡工作与家庭。"
    },
{
        "word": "account",
        "phonetic": "/əˈkaʊnt/",
        "meaning": "n. 账户；叙述 v. 解释；说明",
        "example_sentence": "She opened a new savings account at the bank yesterday.",
        "translation": "她昨天在银行开了一个新的储蓄账户。"
    },
    {
        "word": "rent",
        "phonetic": "/rɛnt/",
        "meaning": "n. 租金 v. 租借；出租",
        "example_sentence": "The rent for the apartment is due at the end of the month.",
        "translation": "公寓的租金将在月底到期。"
    },
    {
        "word": "grocery",
        "phonetic": "/ˈɡrəʊsəri/",
        "meaning": "n. 食品杂货店；食品杂货",
        "example_sentence": "She went to the grocery store to buy fresh vegetables for dinner.",
        "translation": "她去杂货店买新鲜蔬菜准备晚餐。"
    },
    {
        "word": "secure",
        "phonetic": "/sɪˈkjʊə/",
        "meaning": "adj. 安全的；可靠的 v. 保卫；确保",
        "example_sentence": "They secured the building with new locks after the break-in.",
        "translation": "入室盗窃后，他们为大楼安装了新锁以确保安全。"
    },
    {
        "word": "graduate",
        "phonetic": "/ˈɡrædjʊət/",
        "meaning": "n. 毕业生 v. 毕业",
        "example_sentence": "He graduated from university with a degree in engineering.",
        "translation": "他从大学毕业，获得了工程学学位。"
    },
    {
        "word": "gather",
        "phonetic": "/ˈɡæðə/",
        "meaning": "v. 收集；聚集",
        "example_sentence": "They gathered around the table to discuss the plan.",
        "translation": "他们聚集在桌子周围讨论计划。"
    },
    {
        "word": "emergency",
        "phonetic": "/ɪˈmɜːdʒənsi/",
        "meaning": "n. 紧急情况；突发事件",
        "example_sentence": "The ambulance arrived quickly after the emergency call was made.",
        "translation": "接到紧急电话后，救护车迅速到达。"
    },
    {
        "word": "volunteer",
        "phonetic": "/ˌvɒlənˈtɪə/",
        "meaning": "n. 志愿者 v. 自愿做某事",
        "example_sentence": "She volunteered to help organize the charity event.",
        "translation": "她自愿帮助组织慈善活动。"
    },
    {
        "word": "pipe",
        "phonetic": "/paɪp/",
        "meaning": "n. 管子；管道",
        "example_sentence": "The plumber fixed the leaking pipe under the sink.",
        "translation": "水管工修好了水槽下的漏水管。"
    },
    {
        "word": "figure",
        "phonetic": "/ˈfɪɡə/",
        "meaning": "n. 数字；人物 v. 认为；计算",
        "example_sentence": "The company released its latest sales figures yesterday.",
        "translation": "公司昨天公布了最新的销售数据。"
    },
    {
        "word": "downtown",
        "phonetic": "/ˈdaʊntaʊn/",
        "meaning": "n. 市中心 adj. 市中心的 adv. 往市中心",
        "example_sentence": "They decided to go downtown for dinner at a new restaurant.",
        "translation": "他们决定去市中心的一家新餐馆吃晚餐。"
    },
    {
        "word": "draw sth out of sth",
        "phonetic": "/drɔː ˈsʌmθɪŋ aʊt ɒv/",
        "meaning": "phr. 从某事中提取某物；引出",
        "example_sentence": "She tried to draw inspiration out of her daily experiences.",
        "translation": "她试图从日常生活中汲取灵感。"
    },
    {
        "word": "operation",
        "phonetic": "/ˌɒpəˈreɪʃən/",
        "meaning": "n. 手术；运作；操作",
        "example_sentence": "The patient underwent a successful heart operation last week.",
        "translation": "上周病人进行了成功的心脏手术。"
    },
    {
        "word": "lap",
        "phonetic": "/læp/",
        "meaning": "n. 大腿；（跑道的）一圈",
        "example_sentence": "She held the baby on her lap while she read a book.",
        "translation": "她把宝宝抱在腿上，一边读书。"
    },
    {
        "word": "teller",
        "phonetic": "/ˈtɛlə/",
        "meaning": "n. 出纳员；讲述者",
        "example_sentence": "The bank teller counted out the money before handing it to the customer.",
        "translation": "银行出纳员在把钱交给客户之前点清了数目。"
    },
    {
        "word": "scene",
        "phonetic": "/siːn/",
        "meaning": "n. 场景；场面",
        "example_sentence": "The police arrived at the scene of the accident within minutes.",
        "translation": "警察在几分钟内赶到了事故现场。"
    },
    {
        "word": "flat",
        "phonetic": "/flæt/",
        "meaning": "n. 公寓 adj. 平的；扁平的",
        "example_sentence": "They live in a small flat near the city center.",
        "translation": "他们住在市中心附近的一间小公寓里。"
    },
    {
        "word": "response",
        "phonetic": "/rɪˈspɒns/",
        "meaning": "n. 反应；回答",
        "example_sentence": "His response to the question was both thoughtful and precise.",
        "translation": "他对这个问题的回答既有深思熟虑又十分准确。"
    }
                // Your data goes here
            ];
            createTable(data);
        });
    </script>
</head>
<body>
    <table id="wordsTable">
        <!-- Table content will be generated by JavaScript -->
    </table>
</body>
</html>
